package com.hjq.fcloud.http.api

import com.hjq.fcloud.http.Urls
import com.hjq.http.config.IRequestApi

/**
 *    author : Android 轮子哥
 *    github : https://github.com/getActivity/AndroidProject-Kotlin
 *    time   : 2019/12/07
 *    desc   : 用户登录
 */
class LoginApi : IRequestApi {

    override fun getApi(): String {
        return Urls.URL_LOGIN
    }

    private var phone: String? = null
    private var code: String? = null
    private var sendtoken:String? = null
    private var source = 2

    fun setSendtoken(sendtoken: String?): LoginApi = apply {
        this.sendtoken = sendtoken
        return this
    }


    fun setPhone(phone: String?): LoginApi = apply {
        this.phone = phone
        return this
    }

    fun setCode(password: String?): LoginApi = apply {
        this.code = password
        return this
    }

    class DataJson {
        var token: String? = null
    }
}